﻿using KaupischITC.CardReader;
using KaupischITC.CardReader.Results;

namespace SampleApp
{
	public class Program
	{
		public static void Main(string[] args)
		{
			//using (var cardTerminalClient = new CardTerminalClient(new ReinertSctCyberJackApi()))
			using (var cardTerminalClient = new CardTerminalClient(new CherrySt2052Api()))
			{
				cardTerminalClient.ResetCT();

				string result = cardTerminalClient.RequestICC();
				if (result=="9000")
				{
					cardTerminalClient.SelectKVK();
					KvkResult kvkResult = cardTerminalClient.ReadKVK();
				}
				else
				{
					cardTerminalClient.SelectEGK();
					EgkResult egkResult = cardTerminalClient.ReadEGK();
				}

				cardTerminalClient.EjectICC();
			}
		}
	}
}
